/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.resources(
    'knowledgebases',
    '/api/knowledgebases',
    controller.knowledgebases
  );
  router.resources(
    'instruction',
    '/api/instruction',
    controller.instruction
  );
  router.post('/api/chat', controller.chat.index);
  router.post('/api/chatgpt', controller.chat.gpt);


};
